package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Employee;
import cn.wolfcode.crm.query.EmployeeQueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {

    int deleteByPrimaryKey(Long id);

    int insert(Employee record);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    int updateByPrimaryKey(Employee record);

    List<Employee> selectByCondition(EmployeeQueryObject qo);

    void deleteRelation(Long id);

    void insertRelation(@Param("empId") Long empId,@Param("roleId") Long roleId);

    Employee selectByNameandPwd(@Param("username") String username, @Param("password") String password);

    void deleteByIds(@Param("ids") Long[] ids);

    Employee selectByName(Object username);

    List<Employee> selectEmpByRoleSns(@Param("rolesns") String[] rolesns);
}